package com.axapoint.opoc.service;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

// POJO, no interface no extends

//Sets the path to base URL + /hello
@Path("/organisation/demodata/setup")
public class SetupDemoData {
	
	// This method is called if TEXT_PLAIN is request
	@GET
	@Produces(MediaType.TEXT_PLAIN)
	public String sayPlainTextSetup() {
		return "Hello ";
	}

	// This method is called if XMLis request
	@GET
	@Produces(MediaType.TEXT_XML)
	public String sayXMLSetup() {
		return "<?xml version=\"1.0\"?>" + "<hello> Hello" + "</hello>";
	}

	// This method is called if HTML is request
	@GET
	@Produces(MediaType.TEXT_HTML)
	public String sayHtmlSetup() {
		DemoData.setup();
		return "<html> " + "<title>" + "Organisation data has been setup" + "</title>"
				+ "<body><h1>" + "Organisation data has been setup" + "</body></h1>" + "</html> ";
	}

}